import { defineStore } from 'pinia'
import { ref } from 'vue'
// 引入ts类型
import type { addressInfoType } from '@/types/address'
// 订单仓库
export const useOrderStore = defineStore('orderStore', () => {
  const selectAddress = ref<addressInfoType>({} as addressInfoType)
  // 存储选中的地址
  const setAddress = (data: addressInfoType) => {
    selectAddress.value = data
  }
  return {
    selectAddress,
    setAddress
  }
})
